from django.urls import path
from . import views

app_name = 'main'

urlpatterns = [
    # 景点列表页

    path('', views.AttractionListView.as_view(), name='attraction_list'),
    path('sentiment-best/', views.SentimentBestAttractionsView.as_view(), name='sentiment_best'),

    # 景点详情页
    path('attraction/<int:pk>/', views.AttractionDetailView.as_view(), name='attraction_detail'),

    # 景点分类页
    path('category/<int:category_id>/', views.AttractionByCategoryView.as_view(), name='attraction_by_category'),

    # 情感分析页
    path('sentiment-analysis/', views.SentimentAnalysisView.as_view(), name='sentiment_analysis'),

    # 热度排行榜
    path('hot-rank/', views.HotRankView.as_view(), name='hot_rank'),

    # 搜索功能
    path('search/', views.AttractionSearchView.as_view(), name='attraction_search'),

    # 评论功能
    path('comment/add/<int:attraction_id>/', views.CommentCreateView.as_view(), name='add_comment'),
    path('comment/reply/<int:comment_id>/', views.ReplyCreateView.as_view(), name='reply_comment'),
    path('comment/delete/<int:pk>/', views.CommentDeleteView.as_view(), name='delete_comment'),
]
